local rolely_baguan = fk.CreateSkill {
    name = "rolely_baguan",
    anim_type = "offensive",
    tags = { Skill.Limited }
}
Fk:loadTranslationTable {
    ["rolely_baguan"] = "霸关",
    [":rolely_baguan"] = "限定技，当你于其他角色的回合内脱离濒死状态后，立刻结束当前回合，你摸三张牌并立刻执行一个额外的出牌阶段。",

    ["$rolely_baguan1"] = "金刚怒问庶子，何堪修罗之怒！",
    ["$rolely_baguan2"] = "佛陀悯劝来者，莫渡弱水黄泉！",
}
rolely_baguan:addEffect(fk.AfterDying, {
    can_trigger = function(self, event, target, player, data)
        return target == player and
            player:hasSkill(rolely_baguan.name) and player.room.current ~= player and
            player:usedSkillTimes(rolely_baguan.name, Player.HistoryGame) == 0
    end,
    on_cost = function(self, event, target, player, data)
        return player.room:askToSkillInvoke(player, { skill_name = rolely_baguan.name, prompt = "霸关：是否立刻结束当前回合，摸牌并执行阶段" })
    end,
    on_use = function(self, event, target, player, data)
        target:endCurrentPhase()
        player:drawCards(3, rolely_baguan.name)
        player:gainAnExtraPhase(Player.Play, rolely_baguan.name)
    end,
})
return rolely_baguan
